using System;
using System.Collections.Generic;
using System.Threading;
using System.Diagnostics;
using SwModem.Com;
using Dsp;


namespace SwModem.Fsk
{
    /// <summary>
    /// Tx part of a general (configurable) FSK modem
    /// </summary>
    public class FskSetupInfo 
    {
        double    fs;
        double    baudRate;
        byte      bitsPerSymbol;
        int       fskSymbolSize;
        double [] fskSymbolFreq;
        VectorD[] fskSymbolWave;

        public FskSetupInfo()
        {
            fs = 44100.0;
            baudRate = 128.0;
            bitsPerSymbol = 1;
            fskSymbolSize = (int)Math.Ceiling(fs / baudRate);
            fskSymbolFreq = new double [2] { 0800.0/fs, 1600.0/fs };

            fskSymbolWave    = new VectorD[2];             
            fskSymbolWave[0] = new VectorD(/*fskSymbolSize*/);
            fskSymbolWave[1] = new VectorD(/*fskSymbolSize*/);
            
            //int i;
            //for (i = 0; i < fskSymbolSize; i++)
            //{
            //    fskSymbolWave[0][i] = 1.0 * Math.Cos(fskSymbolFreq[0]*i);
            //    fskSymbolWave[1][i] = 1.0 * Math.Cos(fskSymbolFreq[1]*i);
            //}
        }


        #region Properties
        public double    Fs            { get { return fs;            } }
        public double    BaudRate      { get { return baudRate;      } }
        public byte      BitsPerSymbol { get { return bitsPerSymbol; } }
        public double [] FskSymbolFreq { get { return fskSymbolFreq; } }
        public VectorD[] FskSymbolWave { get { return fskSymbolWave; } }
        public int       FskSymbolSize { get { return fskSymbolSize; } }
        #endregion
    }
}
